/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wf.dto.geo;

import com.google.gson.Gson;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.Transient;
import wf3.geo.Concap;

/**
 *
 * @author romulogalindo
 */
@Entity
@NamedNativeQueries({
    @NamedNativeQuery(
            name = "frawor2.pgcongeo",
            query = "select C.* from frawor2.pgcongeo(:p_co_congeo) C ",
            resultClass = wf.dto.geo.CongeoDto.class)
})
public class CongeoDto implements Serializable {

    @Id
    @Column(name = "co_congeo")
    private Integer co_congeo;
    @Column(name = "no_congeo")
    private String no_congeo;

    //Elementos de uso interno
    @Transient
    private Integer co_conpad;
    @Transient
    private boolean il_sesion;
    @Transient
    private int transa;
    @Transient
    boolean cabecera = true;
    @Transient
    String no_item = "";
    @Transient
    String no_path = "";
    @Transient
    private List<Concap> ls_concap;
    @Transient
    private String nu_latlng;
    @Transient
    private int nu_zoomap;
    @Transient
    List<Exception> lsexc = new ArrayList<>();

    public CongeoDto() {
        ls_concap = new ArrayList<>();
    }

    public Integer getCo_congeo() {
        return co_congeo;
    }

    public void setCo_congeo(Integer co_congeo) {
        this.co_congeo = co_congeo;
    }

    public String getNo_congeo() {
        return no_congeo;
    }

    public void setNo_congeo(String no_congeo) {
        this.no_congeo = no_congeo;
    }

    public Integer getCo_conpad() {
        return co_conpad;
    }

    public void setCo_conpad(Integer co_conpad) {
        this.co_conpad = co_conpad;
    }

    public boolean isIl_sesion() {
        return il_sesion;
    }

    public void setIl_sesion(boolean il_sesion) {
        this.il_sesion = il_sesion;
    }

    public int getTransa() {
        return transa;
    }

    public void setTransa(int transa) {
        this.transa = transa;
    }

    public boolean isCabecera() {
        return cabecera;
    }

    public void setCabecera(boolean cabecera) {
        this.cabecera = cabecera;
    }

    public String getNo_item() {
        return no_item;
    }

    public void setNo_item(String no_item) {
        this.no_item = no_item;
    }

    public String getNo_path() {
        return no_path;
    }

    public void setNo_path(String no_path) {
        this.no_path = no_path;
    }

    public List<Concap> getLs_concap() {
        return ls_concap;
    }

    public void setLs_concap(List<Concap> ls_concap) {
        this.ls_concap = ls_concap;
    }

    public String getNu_latlng() {
        return nu_latlng;
    }

    public void setNu_latlng(String nu_latlng) {
        this.nu_latlng = nu_latlng;
    }

    public int getNu_zoomap() {
        return nu_zoomap;
    }

    public void setNu_zoomap(int nu_zoomap) {
        this.nu_zoomap = nu_zoomap;
    }

    public List<Exception> getLsexc() {
        return lsexc;
    }

    public void setLsexc(List<Exception> lsexc) {
        this.lsexc = lsexc;
    }

    public String get_JSON() {
        return new Gson().toJson(this);
    }

}
